Repository navigation
MenuItem decomposition - wrapperStyle-only MenuItemWithTopDescription rows - #105621
Conversation
…Field Co-authored-by: Pujan Shah <Pujan92@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
🤖 Android test steps verification results: The PR's Tests section is still a TODO, so I tested each row from the "Rows migrated" table. Unit, Country, and Custom tag name look and work as before. Commuter exclusions, the Flag amounts "Type" row, and Certinia FX expense account could not be reached on this test account, so they are untested. No step failed.
|
|
@MelvinBot merge main and fix conflicts. Also add qa steps in the pr description |
…StyleOnlyMenuItemWithTopDescription Co-authored-by: Pujan Shah <Pujan92@users.noreply.github.com> # Conflicts: # config/eslint/eslint.seatbelt.tsv
|
I merged Conflict: QA steps: These cover each migrated row: Distance rates settings, the Category Flag amounts over page, Multi-level tags, and Certinia Advanced (only if a test connection is available). Each check confirms the value, chevron, spacing, and navigation, plus the read-only state where it applies. |
|
The failing Analysis: Oxlint reports 2 Fix in progress: [No QA] Stop reading Onyx loading status on the company card Reimbursable page removes that call. After it merges, merge The other non-passing checks are |
|
@MelvinBot mark pr ready for review |
|
This PR is now marked as ready for review. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb Safari |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3806b78c9c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| <MenuItemField | ||
| name={translate('workspace.certinia.fxExpenseAccount')} | ||
| value={selectedFxExpenseAccountName} | ||
| onPress={!policyID ? undefined : () => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_FX_EXPENSE_ACCOUNT.path))} |
There was a problem hiding this comment.
Add a Sentry label to the FX account row
When an administrator opens the FX expense-account selector, this modified interactive MenuItemField has no sentryLabel, so its web interaction cannot be identified by the required Sentry/FullStory label. Add a stable entry from CONST.SENTRY_LABEL for this action.
AGENTS.md reference: AGENTS.md:L76-L77
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
No sentryLabel is configured for this item in the main
| <MenuItemField | ||
| name={translate('common.type')} | ||
| value={translate(`workspace.rules.categoryRules.expenseLimitTypes.${expenseLimitType}`)} | ||
| onPress={() => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.EXPENSE_LIMIT_TYPE_SELECTOR.path))} |
There was a problem hiding this comment.
Add a Sentry label to the expense type row
When an administrator opens the expense-limit type selector, this modified interactive MenuItemField has no sentryLabel, leaving the press without the required Sentry/FullStory identifier. Add a stable entry from CONST.SENTRY_LABEL for this action.
AGENTS.md reference: AGENTS.md:L76-L77
Useful? React with 👍 / 👎.
| <MenuItemField | ||
| name={translate('workspace.distanceRates.commuterExclusions.title')} | ||
| value={getCommuterExclusionsSummary(policy?.commuterExclusions, defaultUnit, translate)} | ||
| onPress={() => Navigation.navigate(ROUTES.WORKSPACE_DISTANCE_RATES_COMMUTER_EXCLUSIONS.getRoute(policyID))} |
There was a problem hiding this comment.
Add a Sentry label to the commuter exclusions row
When an administrator opens the commuter-exclusions page, this modified interactive MenuItemField lacks a sentryLabel, so the navigation press is not available under the repository's required Sentry/FullStory label. Add a stable entry from CONST.SENTRY_LABEL.
AGENTS.md reference: AGENTS.md:L76-L77
Useful? React with 👍 / 👎.
| <MenuItemField | ||
| name={translate(`workspace.tags.customTagName`)} | ||
| value={getCleanedTagName(currentPolicyTag.name)} | ||
| onPress={canWriteTags ? navigateToEditTag : undefined} |
There was a problem hiding this comment.
Add a Sentry label to the custom tag name row
When a user with tag write access opens the tag-name editor, this modified interactive MenuItemField has no sentryLabel, preventing the press from receiving the required Sentry/FullStory identifier. Add a stable entry from CONST.SENTRY_LABEL for this action.
AGENTS.md reference: AGENTS.md:L76-L77
Useful? React with 👍 / 👎.
…enuItemField Co-authored-by: Pujan Shah <Pujan92@users.noreply.github.com>
|
@roryabraham Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
1 similar comment
|
@roryabraham Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.31-0 🚀
|
|
No help site update needed — this PR refactors existing settings rows without adding a workflow, changing labels, or making existing instructions incorrect. |
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.31-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.5.31-4 🚀
Bundle Size Analysis (Sentry): |

















Explanation of Change
This is the next Phase 3 batch. It covers the
MenuItemWithTopDescriptionrows that need no new preset or prop, where the only thing to sort out iswrapperStyle. It moves 7 rows in 5 files to the existingMenuItemFieldpreset. This is a pure refactor, so each row should render the same as before.Mapping used:
description→name,title→value.shouldShowRightIcon+interactive={cond}→onPress={cond ? fn : undefined}. The preset shows the chevron and hover state only whenonPressis set, and it still runscallFunctionIfActionIsAllowed.brickRoadIndicator→ a<MenuItem.BrickRoadIndicator>child, the same wayCertiniaExportPagedoes it.wrapperStyle:ph5,pv3, andpt3are dropped. They equal the base row padding (popoverMenuItemis 20 horizontal, 12 vertical).mt3andmb5margins move to a wrapperView.MenuItemFielddoesn't forwardstyle, and a margin outside the pressable lays out the same as one on it. This matches existingMenuItemFieldcall sites.Rows migrated:
wrapperStylePolicyDistanceRatesSettingsPage.tsxph5dropped,mt3moves to aViewPolicyDistanceRatesSettingsPage.tsxph5droppedPolicyDistanceRatesSettingsPage.tsxph5dropped,mt3moves to aViewDynamicCategoryFlagAmountsOverPage.tsxph5dropped,mt3moves to aViewDynamicWorkspaceViewTagsPage.tsxmb5moves to aViewCertiniaAdvancedPage.tsxph5/pv3droppedPolicyCommuterExclusionsPage.tsxph5/pt3droppedThe matching
no-deprecated/MenuItemWithTopDescriptionentries inconfig/oxlint/oxlint.seatbelt.tsvare left as is. PercontributingGuides/LINTING.md, the lint job onmaintightens that baseline after merge.Left out on purpose: the other
wrapperStylerows override the base padding (pv2,ph4,p0,sectionMenuItemTopDescription), need aref, or also need a prop with no leaf. Those need raw composition or a reviewer decision.One small edge case: the Certinia row used to show a chevron even when
policyIDwas missing andonPresswasundefined. It now hides the chevron in that case, because the row can't be pressed.Fixed Issues
$ #100312
PROPOSAL: #100312 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
QA Steps
For each row below, verify the row looks the same as on production: label on top, value below, same left/right padding as nearby rows, and the same spacing above or below it.
Distance rates settings
Exclude commutes: default work arrangement
Category "Flag amounts over"
Multi-level tags
Certinia (only if a Certinia FFA test connection is available)
AI Tests
These ran locally and passed:
npm run typechecknpm run linton the changed files.main(which replaced ESLint with oxlint),tsc --noEmitpassed again. The merge didn't change the four files in this PR.npm run spell-changednpm run react-compiler-compliance-check check <changed files>oxfmtFor the
PolicyCommuterExclusionsPagefollow-up commit:npm run typecheck,npm run lint-changed,npm run spell-changed, and the React Compiler check passed.npm run lint-changedalso reported 2no-onyx-loading-statuserrors inWorkspaceCompanyCardReimbursablePage.tsx, which came in frommainand isn't part of this PR.oxfmtwasn't run on that commit.I couldn't run a web check of the migrated rows. The local dev web session rendered a blank page with no network traffic on both attempts, so none of the rows were reached. Jest and the Storybook smoke test were not run.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari